//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: shuangpin.h 757 2007-05-10 08:19:31Z roger $
//

#ifndef _SHUANGPIN_H
#define _SHUANGPIN_H
#include <unihan_im.h>

#define SP_TABLE_MAX_LEN 27
#define SHENGMU 0
#define YUNMU 1

#define SM_ZERO '.'

typedef int SPFlag;

typedef struct _SPCell {
	char keyname;
	char sheng[3];
	char yun1[5];
	char yun2[5];
} SPCell;


typedef SPCell SPTable[SP_TABLE_MAX_LEN];

int sp_proc(UnihanIM *uim, IMKeyEvent *kev, SPTable *sp_table);
void sp_table_init(SPTable *sp_table);
void sp_back_space(UnihanIM *uim);
void sp_clear_InputCell(UnihanIM *uim);
int sp_strlen(char *str, SPFlag sp_flag);

#endif /* _SHUANGPIN_H */

// vi:ts=4:nowrap:cin:expandtab
